<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- <p id="p">哈哈</p> -->
    <div id="t">嘻嘻</div>
    <script>
      try {
        document.querySelector('#p').addEventListener('click', () => {
          console.log(22)
        })
        document.querySelector('#t').addEventListener('click', () => {
          console.log(33)
        })
      } catch (e) {
        console.log(e)
      }
      console.log(11)
    </script>
  </body>
</html>
